package mars.game.core;

import android.graphics.Canvas;
import android.view.KeyEvent;
import android.view.MotionEvent;

public interface MarsScreen
{
	
	public void tick();
	
	public void onTouchEvent(MotionEvent event);
	
	public void draw(Canvas canvas);
	
	/**
	 * This method is called when the runtime move this screen to foreground
	 * 
	 * @param entryPoint
	 *            the entry point for enter this screen
	 * @param args
	 *            some arguments to pass to this screen
	 */
	void focusIn(int entryPoint, Object... args);
	
	/**
	 * This method is called when the runtime move this screen to background
	 */
	void focusOut();
	
	/**
	 * This method is automatically called when this screen lost focus
	 */
	void releaseRes();
	
	public void onKeyDown(int keyCode, KeyEvent event);
	
	public void onKeyUp(int keyCode, KeyEvent event);
	
}
